<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>注册设置</title>
    <link rel="stylesheet" href="/static/assets/libs/layui/css/layui.css" />
    <link rel="stylesheet" href="/static/assets/module/admin.css?v=312" />
    <style>
        .layui-form-item {
            margin-bottom: 25px;
        }

        label .layui-icon {
            font-size: 14px;
            color: #666;
        }
    </style>
</head>

<body>
    <!-- 正文开始 -->
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header">注册设置</div>
            <div class="layui-card-body">
                <div class="layui-tab">
                    <ul class="layui-tab-title">
                        <li class="layui-this">短信码</li>
                    </ul>
                    <div class="layui-tab-content">
                        <div class="layui-tab-item layui-show">
                            <form class="layui-form">
                                <blockquote class="layui-elem-quote">
                                    <p>修改指南: 设置注册方式是否需要短信验证码</p>
                                </blockquote>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">短信码：</label>
                                    <div class="layui-input-block">
                                        <input type="radio" name="reg_phone" value="0" title="关闭" {eq name="$info.reg_phone" value="0"}checked{/eq}>
                                        <input type="radio" name="reg_phone" value="1" title="开启" {eq name="$info.reg_phone" value="1"}checked{/eq}>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">阿里Keyid:</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="al_KeyId" placeholder="" class="layui-input" lay-verType="tips"
                                               lay-verify="required" value="{$info.al_KeyId}" required />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">阿里Secret:</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="al_Secret" placeholder="" class="layui-input" lay-verType="tips"
                                               lay-verify="required" value="{$info.al_Secret}" required />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">阿里签名:</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="al_signName" placeholder="" class="layui-input" lay-verType="tips"
                                               lay-verify="required" value="{$info.al_signName}" required />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">模板编号:</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="al_templateCode" placeholder="" class="layui-input" lay-verType="tips"
                                               lay-verify="required" value="{$info.al_templateCode}" required />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-filter="formSubmitBas3"
                                            lay-submit>&emsp;提交&emsp;</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">&emsp;重置&emsp;</button>
                                    </div>
                                </div>
                            </form>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- js部分 -->
    <script type="text/javascript" src="/static/assets/libs/layui/layui.js"></script>
    <script type="text/javascript" src="/static/assets/js/common.js?v=312"></script>
    <script type="text/javascript" src="/static/assets/libs/tinymce/tinymce.min.js"></script>
    <script>
        layui.use(['layer', 'form', 'element', 'laydate'], function () {
            var $ = layui.jquery;
            var layer = layui.layer;
            var form = layui.form;
            var element = layui.element;

            // 监听表单提交3
            form.on('submit(formSubmitBas3)', function (data) {
                $.ajax({
                    type: "POST",
                    url: "{:url('admin/cost/pay_ui')}",
                    data: data.field,
                    dataType: "json",
                    success: function (data) {
                        if (data.code == 0) {
                            layer.alert(data.msg);
                        } else {
                            layer.alert(data.msg);
                        }
                    },
                    error: function (data) {
                        alert("请求失败");
                    }
                });

                return false;
            });
        });
    </script>
</body>

</html>